#include<stdio.h>
#include<string.h>

struct STD
{
    int number;
    char name[10];
    int score;
};
 
 int main()
 {
     struct STD stu[5]={{1001,"zhang",65},{1002,"li",75},{1003,"liu",67},{1004,"wang",87},{1005,"tian",61}},temp;
     struct STD *p;
     p=stu;
     int i,j;
     for(j=0;j<4;j++)
     {
         for(i=0;i<4;i++,p++)
         {
            if(stu[i].score <stu[i+1].score)
           {
              temp=stu[i] ;
              stu[i] =stu[i+1] ;
              stu[i+1]=temp;
          }
        }
    }
     

     for(i=0;i<5;i++)
    {
         printf("%d\t%s\t%d\n",stu[i].number ,stu[i].name ,stu[i].score );
    }
}
